These functions are part of the TechDraw Workbench and can be used in macros and from the Python console once the TechDrawGui
module has been imported.
See the TechDraw API for more functions.
Example:
import FreeCAD
import TechDrawGui
p = FreeCAD.ActiveDocument.Page
f = "/home/localuser/myPdfDirectory/savePage.pdf"
TechDrawGui.exportPageAsPdf(p, f)
f = "/home/localuser/mySvgDirectory/savePage.svg"
TechDrawGui.exportPageAsSvg(p, f)
Description: save a copy of pageObject in PDF format to location filePath
Returns: none
Description: save a copy of pageObject in SVG format to location filePath
Returns: none
Description: save a copy of the active view for "document" to file "filePath"
Returns: double (estimated scale)
Options:
Description: add a QGraphicsItem (created using PySide) to a View
Returns: none